package demo.standard;

import java.util.List;

public class TerminalExpression extends AbstractExpression {

    private List<String> terminalStrList;

    public TerminalExpression(List<String> terminalStrList) {
        this.terminalStrList = terminalStrList;
    }

    @Override
    public boolean interpreter(Context context) {
        String data = context.getData();
        if (terminalStrList.contains(data)) {
            return true;
        }
        return false;
    }
}
